<commit_before>from discord.ext import commands
from .utils import config, checks
import random
import discord
import asyncio

class Tapir:
    """the tapir command(s)"""
    
    def __init__(self, bot):
        self.bot = bot
        
    @commands.command()
    async def tapir(self):
        """The wonderful tapir command that outputs a random tapir"""
        tapir_file = config.Config('tapirs.json')
        tapirs = tapir_file.get('tapirs')
        tapir = tapirs[random.randrange(len(tapirs))]
        await self.bot.say(tapir)

    @commands.command(hidden=True)
    @checks.is_owner()
    async def save_tapir(self, *, tapir):
        """allows the saving of a tapirs"""
        tapir_file = config.Config('tapirs.json')
        tapirs = tapir_file.get('tapirs')
        tapirs.append(tapir)
        tapir_file.put(tapirs)
        
def setup(bot):
    bot.add_cog(Tapir(bot))<commit_msg>save tapir confirmation<commit_after>from discord.ext import commands
from .utils import config, checks
import random
import discord
import asyncio

class Tapir:
    """the tapir command(s)"""
    
    def __init__(self, bot):
        self.bot = bot
        
    @commands.command()
    async def tapir(self):
        """The wonderful tapir command that outputs a random tapir"""
        tapir_file = config.Config('tapirs.json')
        tapirs = tapir_file.get('tapirs')
        tapir = tapirs[random.randrange(len(tapirs))]
        await self.bot.say(tapir)

    @commands.command(hidden=True)
    @checks.is_owner()
    async def save_tapir(self, *, tapir):
        """allows the saving of a tapirs"""
        tapir_file = config.Config('tapirs.json')
        tapirs = tapir_file.get('tapirs')
        tapirs.append(tapir)
        tapir_file.put(tapirs)
        self.bot.say('\N{OK HAND SIGN}')
        
def setup(bot):
    bot.add_cog(Tapir(bot))
{'fraction_non_alphanumeric': 0.12060573282855598, 'fraction_numerical': 0.0, 'mean_word_length': 2.783231083844581, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '1720103', 'n_tokens_mistral': 621, 'n_tokens_neox': 592, 'n_words': 138}