mirror of
				https://github.com/keanuplayz/TravBot-v3.git
				synced 2024-08-15 02:33:12 +00:00 
			
		
		
		
	Turned the help command into a paginated embed
This commit is contained in:
		
							parent
							
								
									72ff144cc0
								
							
						
					
					
						commit
						653cc6f8a6
					
				
					 5 changed files with 75 additions and 27 deletions
				
			
		|  | @ -65,6 +65,7 @@ Because versions are assigned to batches of changes rather than single changes ( | |||
| 
 | ||||
| - `%author%` - A user mention of the person who called the command. | ||||
| - `%prefix%` - The prefix of the current guild. | ||||
| - `%command%` - The command's execution path up to the current subcommand. | ||||
| 
 | ||||
| # Utility Functions | ||||
| 
 | ||||
|  | @ -72,11 +73,12 @@ Because versions are assigned to batches of changes rather than single changes ( | |||
| 
 | ||||
| `paginate()` | ||||
| ```ts | ||||
| const pages = ['one', 'two', 'three']; | ||||
| const msg = await channel.send(pages[0]); | ||||
| const pages = ["one", "two", "three"]; | ||||
| 
 | ||||
| paginate(msg, author.id, pages.length, (page) => { | ||||
| 	msg.edit(pages[page]); | ||||
| paginate(channel, author.id, pages.length, (page) => { | ||||
| 	return { | ||||
| 		content: pages[page] | ||||
| 	}; | ||||
| }); | ||||
| ``` | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue