Railgun

if it ain't broke, we'll break it

User Tools

Site Tools


senses:types:command-context

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
senses:types:command-context [2025/07/28 01:57] – Updated function syntax format flashsenses:types:command-context [2025/07/28 03:25] (current) – single word for aesthetics flash
Line 7: Line 7:
 The args field contains a sequential table with the arguments specified, including the unprefixed name of the command that invoked the command and any blank entries are skipped. The args field contains a sequential table with the arguments specified, including the unprefixed name of the command that invoked the command and any blank entries are skipped.
  
-For example, ''!exrate 20 eur <indetermine amount of spaces here> usd'' will results in a Lua table that looks like ''{ [1] = 'exrate', [2] = '20', [3] = 'eur', [4] = 'usd' }''.+For example, ''!exrate 20 eur <indeterminate amount of spaces here> usd'' will results in a Lua table that looks like ''{ [1] = 'exrate', [2] = '20', [3] = 'eur', [4] = 'usd' }''.
  
 ===== msg ===== ===== msg =====
Line 21: Line 21:
   send(text: string): ()   send(text: string): ()
  
-=== Arguments ===+==== Arguments ====
  
   - The first argument should be a non-empty string that will be used as the body of a chat message sent by the bot, if an empty string is provided the function will not error but the invoke will be discarded.   - The first argument should be a non-empty string that will be used as the body of a chat message sent by the bot, if an empty string is provided the function will not error but the invoke will be discarded.
  
-=== Return values ===+==== Returns ====
  
 //This function has no return values.// //This function has no return values.//
Line 37: Line 37:
   respond(text: string): ()   respond(text: string): ()
  
-=== Arguments ===+==== Arguments ====
  
   - The first argument should be a non-empty string that will be used as the body of a chat message sent by the bot, if an empty string is provided the function will not error but the invoke will be discarded.   - The first argument should be a non-empty string that will be used as the body of a chat message sent by the bot, if an empty string is provided the function will not error but the invoke will be discarded.
  
-=== Return values ===+==== Returns ====
  
 //This function has no return values.// //This function has no return values.//
  
senses/types/command-context.1753667822.txt.gz · Last modified: by flash