remove console.logs
This commit is contained in:
		@@ -1,6 +1,7 @@
 | 
				
			|||||||
import { ApplicationCommandOptionType } from 'discord.js'
 | 
					import { ApplicationCommandOptionType } from 'discord.js'
 | 
				
			||||||
import { Command } from '../structures/command'
 | 
					import { Command } from '../structures/command'
 | 
				
			||||||
import { RunOptions } from '../types/commandTypes'
 | 
					import { RunOptions } from '../types/commandTypes'
 | 
				
			||||||
 | 
					import { logger } from '../logger'
 | 
				
			||||||
export default new Command({
 | 
					export default new Command({
 | 
				
			||||||
	name: 'echo',
 | 
						name: 'echo',
 | 
				
			||||||
	description: 'Echoes a text',
 | 
						description: 'Echoes a text',
 | 
				
			||||||
@@ -13,7 +14,7 @@ export default new Command({
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	],
 | 
						],
 | 
				
			||||||
	run: async (interaction: RunOptions) => {
 | 
						run: async (interaction: RunOptions) => {
 | 
				
			||||||
		console.log('echo called')
 | 
							logger.info('echo called')
 | 
				
			||||||
		interaction.interaction.reply(interaction.toString())
 | 
							interaction.interaction.reply(interaction.toString())
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,15 +2,16 @@ import { v4 as uuid } from 'uuid'
 | 
				
			|||||||
import { jellyfinHandler } from "../.."
 | 
					import { jellyfinHandler } from "../.."
 | 
				
			||||||
import { Command } from '../structures/command'
 | 
					import { Command } from '../structures/command'
 | 
				
			||||||
import { RunOptions } from '../types/commandTypes'
 | 
					import { RunOptions } from '../types/commandTypes'
 | 
				
			||||||
 | 
					import { logger } from '../logger'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default new Command({
 | 
					export default new Command({
 | 
				
			||||||
	name: 'passwort_reset',
 | 
						name: 'passwort_reset',
 | 
				
			||||||
	description: 'Ich vergebe dir ein neues Passwort und schicke es dir per DM zu. Kostet auch nix! Versprochen! 😉',
 | 
						description: 'Ich vergebe dir ein neues Passwort und schicke es dir per DM zu. Kostet auch nix! Versprochen! 😉',
 | 
				
			||||||
	options: [],
 | 
						options: [],
 | 
				
			||||||
	run: async (interaction: RunOptions) => {
 | 
						run: async (interaction: RunOptions) => {
 | 
				
			||||||
		console.log('PasswortReset called')
 | 
							logger.info('PasswortReset called')
 | 
				
			||||||
		interaction.interaction.followUp('Yo, ich schick dir eins!')
 | 
							interaction.interaction.followUp('Yo, ich schick dir eins!')
 | 
				
			||||||
		console.log(JSON.stringify(interaction.interaction.member, null, 2))
 | 
							logger.info(JSON.stringify(interaction.interaction.member, null, 2))
 | 
				
			||||||
		jellyfinHandler.resetUserPasswort(interaction.interaction.member, uuid())
 | 
							jellyfinHandler.resetUserPasswort(interaction.interaction.member, uuid())
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,7 @@
 | 
				
			|||||||
import { Message } from "discord.js"
 | 
					import { Message } from "discord.js"
 | 
				
			||||||
 | 
					import { logger } from "../logger"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const name = 'messageCreate'
 | 
					export const name = 'messageCreate'
 | 
				
			||||||
export function execute(message: Message) {
 | 
					export function execute(message: Message) {
 | 
				
			||||||
	console.log(`${JSON.stringify(message)} has been created`)
 | 
						logger.info(`${JSON.stringify(message)} has been created`)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,10 +1,11 @@
 | 
				
			|||||||
import { CustomError, errorCodes } from "../interfaces"
 | 
					import { CustomError, errorCodes } from "../interfaces"
 | 
				
			||||||
 | 
					import { logger } from "../logger"
 | 
				
			||||||
import { ExtendedClient } from "../structures/client"
 | 
					import { ExtendedClient } from "../structures/client"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export async function sendFailureDM(creatorMessage: string, client: ExtendedClient, creatorId?: string): Promise<void> {
 | 
					export async function sendFailureDM(creatorMessage: string, client: ExtendedClient, creatorId?: string): Promise<void> {
 | 
				
			||||||
	if (!creatorId) throw new CustomError('No creator ID present', errorCodes.no_creator_id)
 | 
						if (!creatorId) throw new CustomError('No creator ID present', errorCodes.no_creator_id)
 | 
				
			||||||
	const creator = await client.users.fetch(creatorId)
 | 
						const creator = await client.users.fetch(creatorId)
 | 
				
			||||||
	console.log(`Creator ${JSON.stringify(creator)}`)
 | 
						logger.info(`Creator ${JSON.stringify(creator)}`)
 | 
				
			||||||
	if (creator)
 | 
						if (creator)
 | 
				
			||||||
		if (!creator.dmChannel)
 | 
							if (!creator.dmChannel)
 | 
				
			||||||
			await creator.createDM()
 | 
								await creator.createDM()
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user