openra / orabot Goto Github PK
View Code? Open in Web Editor NEWA reincarnation of OpenRA's famous IRC bot, written in C# to service the OpenRA server on Discord.
A reincarnation of OpenRA's famous IRC bot, written in C# to service the OpenRA server on Discord.
Submissions to https://github.com/OpenRA/ra2 are often overlooked.
When the bot sees desync logs it should not regurgitate them like the exception.log but diff then and display the diff instead.
Making it easier to find the source of this bot via the bot.
Log editing and deleting messages. (It looks like this is possible: https://top.gg/bot/logger .)
Apparently Youtube exposes an atom feed for upload notifications: https://developers.google.com/youtube/v3/guides/push_notifications
C# supports reading such feeds. (Random StackOverflow link: https://stackoverflow.com/questions/10399400/best-way-to-read-rss-feed-in-net-using-c-sharp)
Twitch setup seems to be a bit more convoluted at first glance:
According to the webserver logs, the code directing to the location of the images sports an additional slash (see log below)
This is totally low priority, everything works as intended, but nevertheless, here is the reminder ;)
13:09:41 45.35.196.58:14140 Requested GET /Icons//github-issue-open.png
13:09:41 45.35.196.58:14140 Fully downloaded - 900 @ 5.1 KB/s - /Icons//github-issue-open.png
13:15:49 45.35.205.46:23712 Requested GET /Icons//github-issue-open.png
13:15:49 45.35.205.46:23712 Fully downloaded - 900 @ 3.0 KB/s - /Icons//github-issue-open.png
13:30:06 172.106.11.86:58280 Requested GET /Icons//github-pr-merged.png
13:30:06 172.106.11.86:58280 Fully downloaded - 730 @ 47.5 KB/s - /Icons//github-pr-merged.png
13:45:14 45.35.198.202:64700 Requested GET /Icons//github-issue-open.png
13:45:15 45.35.198.202:64700 Fully downloaded - 900 @ 1.2 KB/s - /Icons//github-issue-open.png
14:19:03 45.35.196.58:28030 Requested GET /Icons//github-issue-open.png
14:19:03 45.35.196.58:28030 Fully downloaded - 900 @ 54.9 KB/s - /Icons//github-issue-open.png
14:21:23 45.35.205.34:24700 Requested GET /Icons//github-issue-open.png
14:21:23 45.35.205.34:24700 Fully downloaded - 900 @ 2.7 KB/s - /Icons//github-issue-open.png
is not really helpful. Parse https://docs.openra.net/en/bleed/search/search_index.json instead.
The IRC bot has it.
[21:19] | orabot | New map: Argal by Super Newbie - https://resource.openra.net/maps/34556/
As a link to the resource centre in the same veins as the github notifications.
Orb
You know what would be really nice is if there was a way to then access these replays without knowing who uploaded them
jaZz_KCS
Orabot DLs the replay, parses it without mentioning who uploaded it and deletes the original post?
jaZz_KCS
Instead it could say smth like "A new replay has been posted" or whatnot
The IRC bot had it.
]games
OpenRA Game - 6 - RA @release-0202
EU Official 1 - 3 - TD @release-0202
cyberia layer 02 - 3 - RA @release-0202
|AK47|DEDI|SSD|20Gbps|5| - 3 - RA @release-0202
WorkumGames - 2 - RA @release-0202
NOT a noob server - 2 - RA @release-0202
halgame - 2 - SP @release-0210
EU Official 6 - 2 - RA @release-0202
_MrMadDoc's_Game - 1 - RA @playtest-0303
TSW - 1 - RA @release-0202
Peacemaker - 1 - RA @release-0202
pallimallinen - 1 - RA @release-0202
EU Official 8 - 1 - RA @release-0202
EU Official 4 - 1 - RA @release-0202
EU Official 2 - 1 - RA @release-0202
DOCKER SERVER - 1 - RA @release-0202
|AK47|DEDI|SSD|20Gbps|11 - 1 - RA @release-0202
Although this can probably be improved upon.
Will use the ORA auth system. Connecting players to their auth identity will make bot-handling of some basic statistics (games, wins) possible, with the potential to implement rankings as well.
Ignore what's written in <!-- ... -->
HTML-style comments that are used in issue and pr templates. It hides all the relevant content.
It was requested that a set of commands be added like ]startTopic <topic>
and ]endTopic
on which the bot prints out the relevant message, pin it and also updates the channel topic with <main_topic> | <temp_topic> |
.
The IRC bot had it.
]players
[21:32] Waiting (playing) --> RA: 33 (189); TD: 3 (28); D2k: 0 (8); Other: 1 (1)
Although this can certainly be improved upon.
Fatal Lua Error: [string "-- Make copies of global functions to preve..."]:30: Uncaught CLR exception at Lua->CLR boundary: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.NullReferenceException: Object reference not set to an instance of an object.
at OpenRA.Mods.Common.Scripting.TriggerGlobal.OnObjectiveCompleted(Player player, LuaFunction func) in OpenRA/OpenRA.Mods.Common/Scripting/Global/TriggerGlobal.cs:line 183
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at OpenRA.Scripting.ScriptMemberWrapper.Invoke(LuaVararg args) in OpenRA/OpenRA.Game/Scripting/ScriptMemberWrapper.cs:line 76
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Eluant.LuaRuntime.MethodWrapper.Invoke(Object[] parms)
at Eluant.LuaRuntime.MakeManagedCall(IntPtr state, MethodWrapper wrapper)
at Eluant.LuaRuntime.Call(IList`1 args)
at Eluant.LuaRuntime.Call(LuaFunction fn, IList`1 args)
at Eluant.LuaFunction.Call(IList`1 args)
at Eluant.LuaFunction.Call(LuaValue[] args)
at OpenRA.Scripting.ScriptContext.WorldLoaded() in OpenRA/OpenRA.Game/Scripting/ScriptContext.cs:line 297
It would be great if the bot would detect the inner exception:
---> System.NullReferenceException: Object reference not set to an instance of an object.
at OpenRA.Mods.Common.Scripting.TriggerGlobal.OnObjectiveCompleted(Player player, LuaFunction func) in OpenRA/OpenRA.Mods.Common/Scripting/Global/TriggerGlobal.cs:line 183
and highlight it.
such as
�https://github.com/OpenRA/OpenRA/wiki/Mapping
https://github.com/OpenRA/OpenRA/wiki/Creating-a-new-unit
possibly everything git has to offer
maybe put everything under 1 command
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.