Code for a discord bot
I need to write code that automatically converts lines of text into a simplified breakdown list of values. Ideally it would snatch this line of text from a website (it's a web browser game) and then spit the data into a discord channel via bot.
I don't care what code language, any language that discord bots will accept (i dont know anything about discord bots)
Ex:
Original text
------------------
Director Dishiestglobe of Corvia ordered a naval attack upon your nation of Militaires Sans Frontieres. The attack was a Pyrrhic victory. Director Dishiestglobe's forces lost 20 ships, while your defenders lost 22 ships. You used 323.75 tons of munitions and 194.25 tons of gasoline defending the attack. The attack destroyed 47.85 infrastructure in the city of FOB Zanzibar, East Africa Islands.
Converted text
-
type: naval
result: Pyrrhic victory
-
attacker: Director Dishiestglobe of Corvia
losses: 20 ships
-
defender: Militaires Sans Frontieres
losses: 22 ships, 323.75 munitions, 194 gasoline, 47.85 infrastructure
3 Replies
GitHub
GitHub - DSharpPlus/DSharpPlus: A .NET library for making bots usin...
A .NET library for making bots using the Discord API. - DSharpPlus/DSharpPlus
There is a channel dedicated to discord bot programming you might want to check out - #discord-dev
I'm not sure how active it is.
Extracting the actual values can probably be done with regex