<commit_before>#!/usr/bin/env python3

# License MIT
# Copyright 2016-2021 <NAME>
# Version 3.0.0

import random
import discord
from dislash import *
from discord.ext import commands
from ftsbot import data

class textcommands(commands.Cog):
	def __init__(self, bot):
		self.bot = bot

	@slash_commands.command(description='Author information')
	async def author(self, ctx):
		await ctx.send(embed=discord.Embed(colour=discord.Colour(0x663399), description='FO-BoT was coded by **FO-nTTaX**'))

	@slash_commands.command(description='On shady betting sites')
	async def betting(self, ctx):
		await ctx.send(embed=discord.Embed(colour=discord.Colour(0x663399), description='[On shady betting sites](https://liquipedia.net/commons/User:FO-nTTaX/Betting'))

	@slash_commands.command(description='Blame someone')
	async def blame(self, ctx):
		await ctx.send(embed=discord.Embed(colour=discord.Colour(0x663399), description='**#blamesalle**'))

	@slash_commands.command(description='Dance')
	async def dance(self, ctx):
		await ctx.send(embed=discord.Embed(colour=discord.Colour(0x663399), description='**EVERYBODY DANCE \\\\Ü/**\n*dances :D\\\\-<*\n*dances :D|-<*\n*dances :D/-<*'))

	@slash_commands.command(description='Roll a dice', options=[
		Option('sides', 'How many sides (default 6)?', Type.INTEGER),
		Option('amount', 'How many dice (default 1)?', Type.INTEGER)
	])
	async def dice(self, ctx, sides=6, amount=1):
		if sides < 2:
			await ctx.send(embed=discord.Embed(colour=discord.Colour(0xff0000), description='A die needs to have a least 2 sides'))
		elif amount < 1:
			await ctx.send(embed=discord.Embed(colour=discord.Colour(0xff0000), description='You need to roll at least one die'))
		result = ''
		if amount == 1:
			result = 'Your ' + str(sides) + '-sided die threw a ' + str(random.randrange(1, sides + 1, 1)) + '.'
		else:
			rolls = [random.randrange(1, sides + 1, 1) for _ in range(amount)]
			result = 'Your ' + str(amount) + ' ' + str(sides) + '-sided dice threw ' + str(rolls) + ' for a total of ' + str(sum(rolls)) + '.'
		await ctx.send(embed=discord.Embed(colour=discord.Colour(0x663399), description=result))

	@slash_commands.command(description='Links to guides')
	async def guides(self, ctx):
		await ctx.send(embed=discord.Embed(colour=discord.Colour(0x00ffff), description='**Liquipedia-Guides**: https://liquipedia.net/starcraft2/User:FO-BoT#Guides'))
<commit_msg>[V3] complete rewrite because the old one was a mess<commit_after>#!/usr/bin/env python3

# License MIT
# Copyright 2016-2021 <NAME>
# Version 3.0.0

import random
import discord
from dislash import *
from discord.ext import commands
from ftsbot import data

class textcommands(commands.Cog):
	def __init__(self, bot):
		self.bot = bot

	@slash_commands.command(description='Author information')
	async def author(self, ctx):
		await ctx.send(embed=discord.Embed(colour=discord.Colour(0x663399), description='FO-BoT was coded by **FO-nTTaX**'))

	@slash_commands.command(description='On shady betting sites')
	async def betting(self, ctx):
		await ctx.send(embed=discord.Embed(colour=discord.Colour(0x663399), description='[On shady betting sites](https://liquipedia.net/commons/User:FO-nTTaX/Betting)'))

	@slash_commands.command(description='Blame someone')
	async def blame(self, ctx):
		await ctx.send(embed=discord.Embed(colour=discord.Colour(0x663399), description='**#blamesalle**'))

	@slash_commands.command(description='Dance')
	async def dance(self, ctx):
		await ctx.send(embed=discord.Embed(colour=discord.Colour(0x663399), description='**EVERYBODY DANCE \\\\Ü/**\n*dances :D\\\\-<*\n*dances :D|-<*\n*dances :D/-<*'))

	@slash_commands.command(description='Roll a dice', options=[
		Option('sides', 'How many sides (default 6)?', Type.INTEGER),
		Option('amount', 'How many dice (default 1)?', Type.INTEGER)
	])
	async def dice(self, ctx, sides=6, amount=1):
		if sides < 2:
			await ctx.send(embed=discord.Embed(colour=discord.Colour(0xff0000), description='A die needs to have a least 2 sides'))
		elif amount < 1:
			await ctx.send(embed=discord.Embed(colour=discord.Colour(0xff0000), description='You need to roll at least one die'))
		result = ''
		if amount == 1:
			result = 'Your ' + str(sides) + '-sided die threw a ' + str(random.randrange(1, sides + 1, 1)) + '.'
		else:
			rolls = [random.randrange(1, sides + 1, 1) for _ in range(amount)]
			result = 'Your ' + str(amount) + ' ' + str(sides) + '-sided dice threw ' + str(rolls) + ' for a total of ' + str(sum(rolls)) + '.'
		await ctx.send(embed=discord.Embed(colour=discord.Colour(0x663399), description=result))

	@slash_commands.command(description='Links to guides')
	async def guides(self, ctx):
		await ctx.send(embed=discord.Embed(colour=discord.Colour(0x00ffff), description='**Liquipedia-Guides**: https://liquipedia.net/starcraft2/User:FO-BoT#Guides'))

{'fraction_non_alphanumeric': 0.16267052501033485, 'fraction_numerical': 0.031211244315832987, 'mean_word_length': 5.52156334231806, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4596647', 'n_tokens_mistral': 1859, 'n_tokens_neox': 1684, 'n_words': 373}