Document Formatted all JSON files. Added sub commands Flag and Flag-Count to the QuickChatHandler.cs

This commit is contained in:
Christopher Darnell committed 2021-05-06 03:25:07 -07:00
1 parent afca839596
commit 990aca3e41
8 files changed
+6905 -6733

No files matched your search

+3 -3
View File
@@ -18,7 +18,7 @@ namespace StarsiegeBot
class BotSettings : BaseCommandModule class BotSettings : BaseCommandModule
{ {
public static Dictionary<string, GuildSettings> GuildSettings; public static Dictionary<string, GuildSettings> GuildSettings;
private readonly string fileName = "guildsettings.json"; private readonly string fileName = "Json/guildsettings.json";
private readonly CancellationTokenSource cancelToken; private readonly CancellationTokenSource cancelToken;
public BotSettings() public BotSettings()
{ {
@@ -127,8 +127,8 @@ namespace StarsiegeBot
{ {
while (true) while (true)
{ {
string output = JsonConvert.SerializeObject(BotSettings.GuildSettings); string output = JsonConvert.SerializeObject(GuildSettings);
await File.WriteAllTextAsync("guildsettings.json", output); await File.WriteAllTextAsync(fileName, output);
await Task.Delay(TimeSpan.FromSeconds(120), cancellationToken); await Task.Delay(TimeSpan.FromSeconds(120), cancellationToken);
if (cancellationToken.IsCancellationRequested) if (cancellationToken.IsCancellationRequested)
{ {
+3 -3
View File
@@ -1,5 +1,5 @@
{ {
"active":[ "active": [
"{0} ventilated {1}.", "{0} ventilated {1}.",
"{0} donated {1}'s body to science.", "{0} donated {1}'s body to science.",
"{0} introduces {1} to the agony of defeat.", "{0} introduces {1} to the agony of defeat.",
@@ -293,7 +293,7 @@
"{0} gets a frag for the other team with {1}'s death", "{0} gets a frag for the other team with {1}'s death",
"{0} rips {1} a new one" "{0} rips {1} a new one"
], ],
"passive":[ "passive": [
"{1} is chewed up and spit out by {0}", "{1} is chewed up and spit out by {0}",
"{1} got curb stomped by {0}", "{1} got curb stomped by {0}",
"{1} gets the Vulcan Nerve Pinch from {0}", "{1} gets the Vulcan Nerve Pinch from {0}",
@@ -342,7 +342,7 @@
"{1} was cut to pieces by {0}'s Series 4 De-Atomizer.", "{1} was cut to pieces by {0}'s Series 4 De-Atomizer.",
"{1} got their atoms rearranged by {0}." "{1} got their atoms rearranged by {0}."
], ],
"generic":[ "generic": [
"{0} died.", "{0} died.",
"{0} had an accident.", "{0} had an accident.",
"{0} gave up.", "{0} gave up.",
+86 -86
View File
@@ -1,155 +1,155 @@
{ {
"say":{ "say": {
"title":"say (%player, %channel, %message[, %sound]);", "title": "say (%player, %channel, %message[, %sound]);",
"description":"", "description": "",
"fields":[ "fields": [
{ {
"name":"%player", "name": "%player",
"value":"This part specifies who gets the message. This can also be replaced with 'everyone'" "value": "This part specifies who gets the message. This can also be replaced with 'everyone'"
}, },
{ {
"name":"%channel", "name": "%channel",
"value":"This part is the channel that the text uses for using the chat window." "value": "This part is the channel that the text uses for using the chat window."
}, },
{ {
"name":"%message", "name": "%message",
"value":"What to send to the player(s)." "value": "What to send to the player(s)."
}, },
{ {
"name":"%sound", "name": "%sound",
"value":"[Optiona Parameter] This part is the sound file (.wav) that you want to play along with the message." "value": "[Optional Parameter] This part is the sound file (.wav) that you want to play along with the message."
} }
] ]
}, },
"order":{ "order": {
"title":"order( %vehicleId, command, [bool | %obj] )", "title": "order( %vehicleId, command, [bool | %obj] )",
"description":"Rawr", "description": "Rawr",
"fields":[ "fields": [
{ {
"name":"%vehicleId", "name": "%vehicleId",
"value":"The vehicle to be ordered" "value": "The vehicle to be ordered"
}, },
{ {
"name":"command", "name": "command",
"value":"the command to issue" "value": "the command to issue"
}, },
{ {
"name":"[bool | %obj]", "name": "[bool | %obj]",
"value":"%obj to interact with, or bool for confirmation" "value": "%obj to interact with, or bool for confirmation"
} }
] ]
}, },
"setposition":{ "setposition": {
"title":"setPosition(%objectId, %xPos, %yPos, %xPos[, %zRot[, %xRot]]);", "title": "setPosition(%objectId, %xPos, %yPos, %xPos[, %zRot[, %xRot]]);",
"description":"Relocates an object to a new place, with optional facing directions", "description": "Relocates an object to a new place, with optional facing directions",
"fields":[ "fields": [
{ {
"name":"%objectId", "name": "%objectId",
"value":"The object you wish to set the position of." "value": "The object you wish to set the position of."
}, },
{ {
"name":"%xPos", "name": "%xPos",
"value":"The X coordinate." "value": "The X coordinate."
}, },
{ {
"name":"%yPos", "name": "%yPos",
"value":"The Y coordinate." "value": "The Y coordinate."
}, },
{ {
"name":"%zPos", "name": "%zPos",
"value":"The X coordinate." "value": "The X coordinate."
}, },
{ {
"name":"%zRot", "name": "%zRot",
"value":"[Optiona Parameter] What direction the %objectId will end up facing." "value": "[Optional Parameter] What direction the %objectId will end up facing."
}, },
{ {
"name":"%xRot", "name": "%xRot",
"value":"[Optiona Parameter]" "value": "[Optional Parameter]"
} }
] ]
}, },
"healobject":{ "healobject": {
"title":"healObject(%objectId, %amount);", "title": "healObject(%objectId, %amount);",
"description":"Give (or take) health to (from) an object or vehicle", "description": "Give (or take) health to (from) an object or vehicle",
"fields":[ "fields": [
{ {
"name":"%objectId", "name": "%objectId",
"value":"The object you wish to adjust the health of." "value": "The object you wish to adjust the health of."
}, },
{ {
"name":"%amount", "name": "%amount",
"value":"Amount of health to bestow upon %objectId. Negative numbers will result in damages." "value": "Amount of health to bestow upon %objectId. Negative numbers will result in damages."
} }
] ]
}, },
"messagebox":{ "messagebox": {
"title":"messageBox(%playerId, %message);", "title": "messageBox(%playerId, %message);",
"description":"Show a message box to a player", "description": "Show a message box to a player",
"fields":[ "fields": [
{ {
"name":"%playerId", "name": "%playerId",
"value":"The player to send the message alert to." "value": "The player to send the message alert to."
}, },
{ {
"name":"%message", "name": "%message",
"value":"The message to display in the alert." "value": "The message to display in the alert."
} }
] ]
}, },
"reloadobject":{ "reloadobject": {
"title":"reloadObject(%vehicleId, %amount);", "title": "reloadObject(%vehicleId, %amount);",
"description":"Reloads a vehicle.", "description": "Reloads a vehicle.",
"fields":[ "fields": [
{ {
"name":"%vehicleId", "name": "%vehicleId",
"value":"The vehicle to send the ammo to." "value": "The vehicle to send the ammo to."
}, },
{ {
"name":"%amount", "name": "%amount",
"value":"Increases ammo count by this amount, negative numbers will deplete ammo reserves.\n(5 regular ammo = 1 blast cannon ammo)" "value": "Increases ammo count by this amount, negative numbers will deplete ammo reserves.\n(5 regular ammo = 1 blast cannon ammo)"
} }
] ]
}, },
"setteam":{ "setteam": {
"title":"reloadObject(%objectId, *IDSTR_TEAM_<TEAM>);", "title": "setteam(%objectId, *IDSTR_TEAM_<TEAM>);",
"description":"Changes the team of the given object.", "description": "Changes the team of the given object.",
"fields":[ "fields": [
{ {
"name":"%objectId", "name": "%objectId",
"value":"The vehicle or object we're changing the team of." "value": "The vehicle or object we're changing the team of."
}, },
{ {
"name":"*IDSTR_TEAM_<TEAM>", "name": "*IDSTR_TEAM_<TEAM>",
"value":"Valid Options: *IDSTR_TEAM_YELLOW, *IDSTR_TEAM_BLUE, *IDSTR_TEAM_RED, *IDSTR_TEAM_PURPLE, *IDSTR_TEAM_NEUTRAL" "value": "Valid Options: *IDSTR_TEAM_YELLOW, *IDSTR_TEAM_BLUE, *IDSTR_TEAM_RED, *IDSTR_TEAM_PURPLE, *IDSTR_TEAM_NEUTRAL"
} }
] ]
}, },
"blast":{ "blast": {
"title":"blast(%objectId, %radius, %damage);", "title": "blast(%objectId, %radius, %damage);",
"description":"Creates a blast zone centered on the object given.", "description": "Creates a blast zone centered on the object given.",
"fields":[ "fields": [
{ {
"name":"%objectId", "name": "%objectId",
"value":"The object at the core of the blast radius." "value": "The object at the core of the blast radius."
}, },
{ {
"name":"%radius", "name": "%radius",
"value":"Size of the blast." "value": "Size of the blast."
}, },
{ {
"name":"%damage", "name": "%damage",
"value":"The amount of damage to cause with the blast." "value": "The amount of damage to cause with the blast."
} }
] ]
}, },
"gethudname":{ "gethudname": {
"title":"getHudName(%vehicleId);", "title": "getHudName(%vehicleId);",
"description":"Returns the name of an object", "description": "Returns the name of an object",
"fields":[ "fields": [
{ {
"name":"%vehicleId", "name": "%vehicleId",
"value":"The object that we want to get the name of." "value": "The object that we want to get the name of."
} }
] ]
} }
+138 -1
View File
@@ -1 +1,138 @@
{"default":{"UseGlobalPrefix":true,"UseSelfRoles":false,"UseLevelRoles":false,"UseLevels":false,"AllowRolesPurchase":false,"UseAutoRoles":false,"Prefixes":["::"],"SelfRoles":{},"LevelRoles":{},"HiddenRolesList":null,"WelcomeChannel":null,"UseWelcome":false,"WelcomeMessage":null},"297873205316681728":{"UseGlobalPrefix":true,"UseSelfRoles":false,"UseLevelRoles":false,"UseLevels":false,"AllowRolesPurchase":false,"UseAutoRoles":false,"Prefixes":[">","::","~"],"SelfRoles":{},"LevelRoles":{},"HiddenRolesList":null,"WelcomeChannel":null,"UseWelcome":false,"WelcomeMessage":null},"376937422010974209":{"UseGlobalPrefix":true,"UseSelfRoles":false,"UseLevelRoles":false,"UseLevels":false,"AllowRolesPurchase":false,"UseAutoRoles":false,"Prefixes":[">"],"SelfRoles":{},"LevelRoles":{},"HiddenRolesList":null,"WelcomeChannel":null,"UseWelcome":false,"WelcomeMessage":null},"768366579468468244":{"UseGlobalPrefix":true,"UseSelfRoles":false,"UseLevelRoles":false,"UseLevels":false,"AllowRolesPurchase":false,"UseAutoRoles":false,"Prefixes":[">"],"SelfRoles":{},"LevelRoles":{},"HiddenRolesList":null,"WelcomeChannel":null,"UseWelcome":false,"WelcomeMessage":null},"831348953097961534":{"UseGlobalPrefix":true,"UseSelfRoles":false,"UseLevelRoles":false,"UseLevels":false,"AllowRolesPurchase":false,"UseAutoRoles":false,"Prefixes":[">","::","~","!","%","^","&","*","(",")","-","_","=","+","[","]","{","}",";",":","<",">",",",".","?"],"SelfRoles":{},"LevelRoles":{},"HiddenRolesList":null,"WelcomeChannel":{"permission_overwrites":[],"guild_id":831348953097961534,"parent_id":831348953097961535,"name":"general","type":0,"position":0,"topic":"","last_message_id":836202598540509245,"bitrate":0,"user_limit":0,"rate_limit_per_user":0,"nsfw":false,"id":831348953097961537},"UseWelcome":true,"WelcomeMessage":"Welcome to channel <#831348953097961537>!"}} {
"default": {
"UseGlobalPrefix": true,
"UseSelfRoles": false,
"UseLevelRoles": false,
"UseLevels": false,
"AllowRolesPurchase": false,
"UseAutoRoles": false,
"Prefixes": [
"::"
],
"SelfRoles": {
},
"LevelRoles": {
},
"HiddenRolesList": null,
"WelcomeChannel": null,
"UseWelcome": false,
"WelcomeMessage": null
},
"297873205316681728": {
"UseGlobalPrefix": true,
"UseSelfRoles": false,
"UseLevelRoles": false,
"UseLevels": false,
"AllowRolesPurchase": false,
"UseAutoRoles": false,
"Prefixes": [
">",
"::",
"~"
],
"SelfRoles": {
},
"LevelRoles": {
},
"HiddenRolesList": null,
"WelcomeChannel": null,
"UseWelcome": false,
"WelcomeMessage": null
},
"376937422010974209": {
"UseGlobalPrefix": true,
"UseSelfRoles": false,
"UseLevelRoles": false,
"UseLevels": false,
"AllowRolesPurchase": false,
"UseAutoRoles": false,
"Prefixes": [
">"
],
"SelfRoles": {
},
"LevelRoles": {
},
"HiddenRolesList": null,
"WelcomeChannel": null,
"UseWelcome": false,
"WelcomeMessage": null
},
"768366579468468244": {
"UseGlobalPrefix": true,
"UseSelfRoles": false,
"UseLevelRoles": false,
"UseLevels": false,
"AllowRolesPurchase": false,
"UseAutoRoles": false,
"Prefixes": [
">"
],
"SelfRoles": {
},
"LevelRoles": {
},
"HiddenRolesList": null,
"WelcomeChannel": null,
"UseWelcome": false,
"WelcomeMessage": null
},
"831348953097961534": {
"UseGlobalPrefix": true,
"UseSelfRoles": false,
"UseLevelRoles": false,
"UseLevels": false,
"AllowRolesPurchase": false,
"UseAutoRoles": false,
"Prefixes": [
">",
"::",
"~",
"!",
"%",
"^",
"&",
"*",
"(",
")",
"-",
"_",
"=",
"+",
"[",
"]",
"{",
"}",
";",
":",
"<",
">",
",",
".",
"?"
],
"SelfRoles": {
},
"LevelRoles": {
},
"HiddenRolesList": null,
"WelcomeChannel": {
"permission_overwrites": [
],
"guild_id": 831348953097961534,
"parent_id": 831348953097961535,
"name": "general",
"type": 0,
"position": 0,
"topic": "",
"last_message_id": 836202598540509245,
"bitrate": 0,
"user_limit": 0,
"rate_limit_per_user": 0,
"nsfw": false,
"id": 831348953097961537
},
"UseWelcome": true,
"WelcomeMessage": "Welcome to channel <#831348953097961537>!"
}
}
+101 -101
View File
@@ -1,103 +1,103 @@
[ [
"The first bird to ever use an Xbox controller was a Kea called Parau.", "The first bird to ever use an Xbox controller was a Kea called Parau.",
"The gold in Tutankhamun’s tomb had been stolen from the tombs of other pharaohs.", "The gold in Tutankhamun’s tomb had been stolen from the tombs of other pharaohs.",
"England’s biggest horticultural export is the fig.", "England’s biggest horticultural export is the fig.",
"The same molecule that makes chicken taste like chicken can also be found in ground up oyster shells.", "The same molecule that makes chicken taste like chicken can also be found in ground up oyster shells.",
"Prince Phillip is widely credited with the invention of the party popper.", "Prince Phillip is widely credited with the invention of the party popper.",
"Thyme is technically a tree.", "Thyme is technically a tree.",
"By definition a snake’s body is a limb.", "By definition a snake’s body is a limb.",
"The roller coaster was invented during the Hundred Years’ War as a way of launching supplies across rivers.", "The roller coaster was invented during the Hundred Years’ War as a way of launching supplies across rivers.",
"The toenail of your little toe is called the ‘spungle’.", "The toenail of your little toe is called the ‘spungle’.",
"Courgette is actually the feminine noun of cucumber.", "Courgette is actually the feminine noun of cucumber.",
"The first video ever uploaded to Youtube had to be taken down in 2016 for violating their Terms of Service.", "The first video ever uploaded to Youtube had to be taken down in 2016 for violating their Terms of Service.",
"There is a nerveless area of skin half the size of a playing card on the top of your foot. Your brain compensates for it.", "There is a nerveless area of skin half the size of a playing card on the top of your foot. Your brain compensates for it.",
"The biggest arms manufacturer in the world is Hasbro.", "The biggest arms manufacturer in the world is Hasbro.",
"By weight, bay leaves contain more caffeine than coffee beans. They are used to make a stimulating tea in Morocco.", "By weight, bay leaves contain more caffeine than coffee beans. They are used to make a stimulating tea in Morocco.",
"Vikings never fired flaming arrows at boats carrying the dead. They would sink them by running them over with a larger boat.", "Vikings never fired flaming arrows at boats carrying the dead. They would sink them by running them over with a larger boat.",
"There is a ‘Buzzy Bee’ still at the top of Mt Everest, left there by Edmund Hillary.", "There is a ‘Buzzy Bee’ still at the top of Mt Everest, left there by Edmund Hillary.",
"Originally the Fonz was going to wear a leather vest but the popularity of the Village People made them switch to a jacket.", "Originally the Fonz was going to wear a leather vest but the popularity of the Village People made them switch to a jacket.",
"Johnny Cash once got into a fist fight with Colonel Sanders over a sports game.", "Johnny Cash once got into a fist fight with Colonel Sanders over a sports game.",
"There are more submarines in lakes right now than there are in the oceans.", "There are more submarines in lakes right now than there are in the oceans.",
"Gold nuggets were named after chicken nuggets – not the other way around.", "Gold nuggets were named after chicken nuggets – not the other way around.",
"Buzz Aldrin left a pen on the moon after the first visit. Eugene Cernan, the last moon walker, found it. It still worked.", "Buzz Aldrin left a pen on the moon after the first visit. Eugene Cernan, the last moon walker, found it. It still worked.",
"There is a pattern on the inside of your upper eyelid that is as unique as your fingerprint.", "There is a pattern on the inside of your upper eyelid that is as unique as your fingerprint.",
"At least two unconnected cultures have used sparrow skulls as a form of currency.", "At least two unconnected cultures have used sparrow skulls as a form of currency.",
"The President of Senegal was one of the scientists who developed the Large Hadron Collider.", "The President of Senegal was one of the scientists who developed the Large Hadron Collider.",
"The kneecap is the roundest part of your body.", "The kneecap is the roundest part of your body.",
"The Nobel Prize for Physics has been awarded to a scientist who proved that a tree falling in the woods really does make a sound.", "The Nobel Prize for Physics has been awarded to a scientist who proved that a tree falling in the woods really does make a sound.",
"JRR Tolkien refused to let his books be read out loud to people until after his death, preferring to keep his words ‘on the page’.", "JRR Tolkien refused to let his books be read out loud to people until after his death, preferring to keep his words ‘on the page’.",
"Paris Hilton and Nicole Richie’s ‘The Simple Life’ is one of the most syndicated TV shows in the world.", "Paris Hilton and Nicole Richie’s ‘The Simple Life’ is one of the most syndicated TV shows in the world.",
"All fossils found in Canada belong to the Queen.", "All fossils found in Canada belong to the Queen.",
"The first sunglasses were actually animal skin scraped so thin that it became transparent.", "The first sunglasses were actually animal skin scraped so thin that it became transparent.",
"Sun Tzu’s ‘The Art of War’ is a sequel. The first book is lost forever.", "Sun Tzu’s ‘The Art of War’ is a sequel. The first book is lost forever.",
"One of the gems on the Crown Jewels is a marble glued there by Edward the Confessor’s son.", "One of the gems on the Crown Jewels is a marble glued there by Edward the Confessor’s son.",
"Researchers in the Antarctic will use apply whitening toothpaste to their drills when boring into the ice shelf.", "Researchers in the Antarctic will use apply whitening toothpaste to their drills when boring into the ice shelf.",
"Due to the inclusion of certain metal isotopes in its construction, the standard trombone is actually radioactive.", "Due to the inclusion of certain metal isotopes in its construction, the standard trombone is actually radioactive.",
"‘Bat Out of Hell’ was written by Meatloaf after an argument with Ozzy Osborne.", "‘Bat Out of Hell’ was written by Meatloaf after an argument with Ozzy Osborne.",
"The word ‘Loanshark’ was originally, ‘Loans, hark’.", "The word ‘Loanshark’ was originally, ‘Loans, hark’.",
"Jellified red wine was used as a lubricant by the ancient Greeks.", "Jellified red wine was used as a lubricant by the ancient Greeks.",
"One of the rings of Saturn is almost pure silver dust.", "One of the rings of Saturn is almost pure silver dust.",
"Every member of Iron Maiden was a Quaker.", "Every member of Iron Maiden was a Quaker.",
"The national anthem of Lithuania is palindromic. It plays backwards exactly the same way that it plays forwards.", "The national anthem of Lithuania is palindromic. It plays backwards exactly the same way that it plays forwards.",
"In Brazil they call Brazil nuts ‘Argentines’.", "In Brazil they call Brazil nuts ‘Argentines’.",
"The first pair of scissors was left-handed.", "The first pair of scissors was left-handed.",
"The @ symbol was invented by Charles de Gaulle.", "The @ symbol was invented by Charles de Gaulle.",
"Every member of The Baha Men is dead.", "Every member of The Baha Men is dead.",
"A furlong was defined as the distance a mule can run in two minutes.", "A furlong was defined as the distance a mule can run in two minutes.",
"The Eiffel Tower has bumps along its ‘legs’ that spell the French national motto in braille.", "The Eiffel Tower has bumps along its ‘legs’ that spell the French national motto in braille.",
"The phrase, ‘If pain persists, see your doctor’ has been copyrighted by Bayer.", "The phrase, ‘If pain persists, see your doctor’ has been copyrighted by Bayer.",
"Venetian blinds were invented in Venice.", "Venetian blinds were invented in Venice.",
"Cat Stevens first name is Catherine.", "Cat Stevens first name is Catherine.",
"The first copy of the Oxford English dictionary is missing the word ‘dictionary’.", "The first copy of the Oxford English dictionary is missing the word ‘dictionary’.",
"New Zealanders use more toilet paper per capita than any other country.", "New Zealanders use more toilet paper per capita than any other country.",
"Otters have been known to coat stones with fish scales to lure in birds.", "Otters have been known to coat stones with fish scales to lure in birds.",
"The largest sushi roll ever made would be impossible to transport through the Channel Tunnel.", "The largest sushi roll ever made would be impossible to transport through the Channel Tunnel.",
"Morris dancing was invented by a guy called Morris.", "Morris dancing was invented by a guy called Morris.",
"95% of people are pronouncing the name of the band ‘Live’ incorrectly.", "95% of people are pronouncing the name of the band ‘Live’ incorrectly.",
"X-rays cannot pass through Velcro.", "X-rays cannot pass through Velcro.",
"The Boy Scouts were counted as part of the American military until 1986.", "The Boy Scouts were counted as part of the American military until 1986.",
"Once a year all of Wikipedia is printed off and placed in a vault in Norway.", "Once a year all of Wikipedia is printed off and placed in a vault in Norway.",
"While Thomas Crapper didn’t invent the toilet, he was killed by one.", "While Thomas Crapper didn’t invent the toilet, he was killed by one.",
"A copy of Detective Comics #38 exists with an error that has Batman constantly refer to his sidekick as ‘Bobin’.", "A copy of Detective Comics #38 exists with an error that has Batman constantly refer to his sidekick as ‘Bobin’.",
"The producers of the movie ‘Air Bud’ are currently suing Apple for copyright infringement.", "The producers of the movie ‘Air Bud’ are currently suing Apple for copyright infringement.",
"Genghis Khan brought dressage to Europe.", "Genghis Khan brought dressage to Europe.",
"Resene has a 100 year contract to provide paint for the Hoover Dam.", "Resene has a 100 year contract to provide paint for the Hoover Dam.",
"Where’s Wally books are used in the entry exam for MI6.", "Where’s Wally books are used in the entry exam for MI6.",
"Bubbles have a seam.", "Bubbles have a seam.",
"In Lesotho it is considered rude not to offer someone a bite of your food before you start eating.", "In Lesotho it is considered rude not to offer someone a bite of your food before you start eating.",
"Dave Bautista has been the leader of an improv troupe for the past twenty years.", "Dave Bautista has been the leader of an improv troupe for the past twenty years.",
"The National Library of Singapore uses woven human hair for bookmarks to preserve the condition of the pages.", "The National Library of Singapore uses woven human hair for bookmarks to preserve the condition of the pages.",
"Percy Bysshe Shelley’s ‘Prometheus Unbound’ contains the first use of the word ‘Whoops’.", "Percy Bysshe Shelley’s ‘Prometheus Unbound’ contains the first use of the word ‘Whoops’.",
"An adolescent owl is called a ‘novice’.", "An adolescent owl is called a ‘novice’.",
"On average, three people are injured every time an audience gives a standing ovation.", "On average, three people are injured every time an audience gives a standing ovation.",
"Napoleon was ashamed of his nipples and refused to let anyone see them. Even during medical treatments.", "Napoleon was ashamed of his nipples and refused to let anyone see them. Even during medical treatments.",
"There are no synonyms for thesaurus.", "There are no synonyms for thesaurus.",
"‘The Fellowship of the Ring’ is the most stolen book in the world.", "‘The Fellowship of the Ring’ is the most stolen book in the world.",
"Peppermint can’t be smelt by guinea pigs.", "Peppermint can’t be smelt by guinea pigs.",
"The Lego headquarters has had to be rebuilt three times due to shoddy construction.", "The Lego headquarters has had to be rebuilt three times due to shoddy construction.",
"MRI scans of cat brains have revealed that they see humans as a prey species.", "MRI scans of cat brains have revealed that they see humans as a prey species.",
"The lowest tone that can be hit by a specific tuba is called the ‘crass’.", "The lowest tone that can be hit by a specific tuba is called the ‘crass’.",
"The ‘Peter Piper Procession’ is a yearly contest wherein participants compete to say the ‘Peter Piper’ tongue twister the fastest.", "The ‘Peter Piper Procession’ is a yearly contest wherein participants compete to say the ‘Peter Piper’ tongue twister the fastest.",
"Examination of recently discovered texts indicates that the Hittites first invented the slinky.", "Examination of recently discovered texts indicates that the Hittites first invented the slinky.",
"Today more messages are sent using carrier pigeons than are sent via fax.", "Today more messages are sent using carrier pigeons than are sent via fax.",
"The banjoist from the ‘Duelling Banjos; scene of Deliverance was offered a record deal. It reached number 15 on the Billboard charts.", "The banjoist from the ‘Duelling Banjos; scene of Deliverance was offered a record deal. It reached number 15 on the Billboard charts.",
"According to the International Federation of Poker, socks don’t count as an item of clothing in strip poker.", "According to the International Federation of Poker, socks don’t count as an item of clothing in strip poker.",
"The Geneva Convention’s prohibition of improper use of distinctive emblems during warfare also applies to the Jolly Roger.", "The Geneva Convention’s prohibition of improper use of distinctive emblems during warfare also applies to the Jolly Roger.",
"Every screw used in the construction of Vatican City has a cross on the head. They must never be upside down.", "Every screw used in the construction of Vatican City has a cross on the head. They must never be upside down.",
"The shoes of King Edward IV were weighted with lead to make his walk seem more imposing.", "The shoes of King Edward IV were weighted with lead to make his walk seem more imposing.",
"During the breeding season, female cockroaches smell like pineapple.", "During the breeding season, female cockroaches smell like pineapple.",
"The music of the band ‘Rush’ has been featured in more video games than any other band or musician.", "The music of the band ‘Rush’ has been featured in more video games than any other band or musician.",
"Emeril Lagasse refused to ever use a spatula.", "Emeril Lagasse refused to ever use a spatula.",
"Kevin Bacon founded an organisation that re-homes rescued factory farm pigs.", "Kevin Bacon founded an organisation that re-homes rescued factory farm pigs.",
"Voltaire’s father was a cobbler.", "Voltaire’s father was a cobbler.",
"In American Football, touchdowns were originally called ‘tapstops’.", "In American Football, touchdowns were originally called ‘tapstops’.",
"The names of all missing persons in Honduras are kept in a register called ‘The Imponderables’.", "The names of all missing persons in Honduras are kept in a register called ‘The Imponderables’.",
"There exists a Sherlock Holmes story containing a kiss between Holmes and Watson but all copies are held by the Doyle estate.", "There exists a Sherlock Holmes story containing a kiss between Holmes and Watson but all copies are held by the Doyle estate.",
"The founders of Johnson & Johnson were not related.", "The founders of Johnson & Johnson were not related.",
"A solid gold fidget spinner has been made, but it broke its first users index finger due to its weight.", "A solid gold fidget spinner has been made, but it broke its first users index finger due to its weight.",
"The longest game of mah-jong ever lasted for three years. It finished when the house it was being played in burned down.", "The longest game of mah-jong ever lasted for three years. It finished when the house it was being played in burned down.",
"In Argentina, ‘Where in the World is Carmen San Diego’ is called, ‘In Pursuit of the Red Rebellious Bird’.", "In Argentina, ‘Where in the World is Carmen San Diego’ is called, ‘In Pursuit of the Red Rebellious Bird’.",
"Historical records indicate that the dairy cow’s moo used to be significantly louder than it currently is.", "Historical records indicate that the dairy cow’s moo used to be significantly louder than it currently is.",
"Penguins have wavy feathers that produce a similar effect when moving through water as golf ball dimples do in the air.", "Penguins have wavy feathers that produce a similar effect when moving through water as golf ball dimples do in the air.",
"The banana tree is the tallest growing grass in the world." "The banana tree is the tallest growing grass in the world."
] ]
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+48 -13
View File
@@ -113,7 +113,7 @@ namespace StarsiegeBot
for (int i = 0; i < quickchats.Count; i++) for (int i = 0; i < quickchats.Count; i++)
{ {
// If this file doesnt exist, log the ID in the console, and add to the count. // If this file doesnt exist, log the ID in the console, and add to the count.
if (!File.Exists($"./qc/{quickchats[i.ToString()].soundFile}")) if (!File.Exists($"./qc/{quickchats[i.ToString()].SoundFile}"))
{ {
missingFiles++; missingFiles++;
Console.Write($"{i}, "); Console.Write($"{i}, ");
@@ -149,7 +149,7 @@ namespace StarsiegeBot
id = Math.Abs(id); id = Math.Abs(id);
} }
chat = quickchats[id.ToString()]; chat = quickchats[id.ToString()];
output = id + ": " + chat.text; output = id + ": " + chat.Text;
} }
catch (Exception) catch (Exception)
{ {
@@ -160,7 +160,7 @@ namespace StarsiegeBot
{ {
id = Program.rnd.Next(quickchats.Count); id = Program.rnd.Next(quickchats.Count);
chat = quickchats[id.ToString()]; chat = quickchats[id.ToString()];
output = $"[{id}] " + chat.text; output = $"[{id}] " + chat.Text;
} }
catch (Exception) catch (Exception)
{ {
@@ -172,13 +172,13 @@ namespace StarsiegeBot
// If the sound file to the select QC exists, upload it as well. // If the sound file to the select QC exists, upload it as well.
msg.Embed = StartEmbed(output); msg.Embed = StartEmbed(output);
if (File.Exists($"./qc/{chat.soundFile}")) if (File.Exists($"./qc/{chat.SoundFile}"))
{ {
// Open the file. // Open the file.
FileStream sound = new FileStream($"./qc/{chat.soundFile}", FileMode.Open, FileAccess.Read); FileStream sound = new FileStream($"./qc/{chat.SoundFile}", FileMode.Open, FileAccess.Read);
// feed it to the Message Builder. // feed it to the Message Builder.
msg.WithFile(chat.soundFile, sound); msg.WithFile(chat.SoundFile, sound);
} }
// Send either the text QC or sound file if we have it // Send either the text QC or sound file if we have it
@@ -210,16 +210,16 @@ namespace StarsiegeBot
foreach (KeyValuePair<string, Quickchat> qc in quickchats) foreach (KeyValuePair<string, Quickchat> qc in quickchats)
{ {
// do we have a match? // do we have a match?
if (qc.Value.text.ToLower().Contains(toSearch.ToLower())) if (qc.Value.Text.ToLower().Contains(toSearch.ToLower()))
{ {
// add it to the list! // add it to the list!
sb.Append($"[{qc.Key}][T] {quickchats[qc.Key].text}\r\n"); sb.Append($"[{qc.Key}][T] {quickchats[qc.Key].Text}\r\n");
count++; count++;
} }
if (qc.Value.soundFile.ToLower().Contains(toSearch.ToLower())) if (qc.Value.SoundFile.ToLower().Contains(toSearch.ToLower()))
{ {
// add it to the list! // add it to the list!
sb.Append($"[{qc.Key}][S] {quickchats[qc.Key].text}\r\n"); sb.Append($"[{qc.Key}][S] {quickchats[qc.Key].Text}\r\n");
count++; count++;
} }
} }
@@ -241,6 +241,37 @@ namespace StarsiegeBot
await ctx.RespondAsync(msg); await ctx.RespondAsync(msg);
} }
[Command("flag")]
[Description("Flags a Quick Chat for moderator checking.")]
public async Task FlagQC(CommandContext ctx, [Description("ID of QC to flag.")] int id, [RemainingText, Description("The reason you believe it needs flagged.")] string flagRerason = "")
{
await ctx.TriggerTypingAsync();
Quickchat chat = quickchats[id.ToString()];
DiscordEmbedBuilder embed;
chat.FlagCount++;
embed = StartEmbed($"Flagging QC ID `{id}` with reason of `{flagRerason}`. (F{chat.FlagCount})");
chat.IsFlagged = true;
string output = JsonConvert.SerializeObject(quickchats);
await File.WriteAllTextAsync(fileName, output);
await ctx.RespondAsync(embed);
}
[Command("flag-count")]
public async Task FlagCount(CommandContext ctx)
{
await ctx.TriggerTypingAsync();
int count = 0;
foreach (var chat in quickchats)
{
if (chat.Value.IsFlagged)
{
count++;
}
}
await ctx.RespondAsync(StartEmbed($"There are {count} flagged Quick Chats."));
}
[Command("toggle"), Aliases("t")] [Command("toggle"), Aliases("t")]
[RequireOwner] [RequireOwner]
[Description("[Owner only] Enables or disables, or checks status of QuickChats.\r\nTo turn the feature on, use `TRUE`, `ON`, or `1`\r\nTo turn off, use `FALSE`, `OFF`, or `0`")] [Description("[Owner only] Enables or disables, or checks status of QuickChats.\r\nTo turn the feature on, use `TRUE`, `ON`, or `1`\r\nTo turn off, use `FALSE`, `OFF`, or `0`")]
@@ -286,11 +317,15 @@ namespace StarsiegeBot
public class Quickchat public class Quickchat
{ {
public string text; [JsonProperty("text")]
public string soundFile; public string Text { get; protected set; }
[JsonProperty("soundFile")]
public string SoundFile { get; protected set; }
public bool IsFlagged { get; set; }
public int FlagCount { get; set; }
public override string ToString() public override string ToString()
{ {
return $"say(0,0, \"{text}\", \"{soundFile}\");"; return $"say(0,0, \"{Text}\", \"{SoundFile}\");";
} }
} }