A
A
Anastasia Sean2020-08-14 03:04:01
Python
Anastasia Sean, 2020-08-14 03:04:01

Is it possible to make this bot, if so, how?

5f35d28e95644078768414.jpeg5f35d29a28a7f123831713.jpegsrc=" https://habrastorage.org/webt/5f/35/d2/5f35d28348e... " alt="image"/>
5f35d2af77fb4702392989.jpeg5f35d2b54f4a0409728898.jpeg
Screenshot 1
There is a channel, let's say "question", in this channel there is an embed message. And there are 2 categories: closed tickets and open ones. After sending your question in the open tickets category, a new channel is created with the name of the current ticket, for example, ticket-10, and a message appears in the "question" channel, which can be seen in screenshot 2.
A message is sent in the ticket-10 channel, which can be seen in screenshot 3 When a moderator writes the hold command, a message is sent, which can be seen in screenshot 4.
Next comes the solution of the issue.
And the last!
When the close command is sent, the message in screenshot 5 is sent, the user is prohibited from posting in this channel, and the channel itself is sent to the "closed tickets" category.
After 12 hours, the ticket is saved to a text document, sent to the user in private messages, and the channel is deleted.

The channel will have people with the role of moderator and above, and the ticket creator himself.
in the channel

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
SKEPTIC, 2020-08-14
@x_shuziK_x

Maybe. This can be done by writing a script in Python.
A bit of work with the discord api and database, but in general it's possible

K
killeryStark, 2020-08-14
@killeryStark

here is a simple cog for questions

@commands.command(aliases=['предложить'])
    async def suggest( self, ctx , * , agr ):
        await ctx.channel.purge(limit = 1)
        suggest_chanell = self.bot.get_channel(#id канала) 
        embed = discord.Embed(title=f"{ctx.author.name} Предложил :", description= f" {agr} \n\n", color = discord.Color.blue())

        message = await suggest_chanell.send(embed=embed)
        await message.add_reaction('✅')
        await message.add_reaction('❎'

if you need to change their status it is better to do it with a database. but if you don’t use it, then you can create a separate channel for each question, but it’s not very convenient.
Here is a simple code for complaints
@commands.command(aliases=['жалоба'])   
    async def report(self, ctx,member: discord.Member = None,*,arg = None):
    
        channel = self.bot.get_channel( #Айди канала жалоб)
    
        if member is None:
    
            await ctx.send(embed = discord.Embed(description = '**:grey_exclamation: Обязательно укажите: пользователя!**'))
    
        elif arg is None:
    
            await ctx.send(embed = discord.Embed(description = '**:grey_exclamation: Обязательно укажите: причину!**'))
    
        else:
            
            await ctx.send(embed = discord.Embed(description =f'**:shield: На пользователя {member.mention} была отправлена жалоба.\n:bookmark_tabs: По причине: {arg}**', color=0x0c0c0c))
            await chanel.send("@everyone") 
            await channel.send(embed = discord.Embed(description =f'**:shield: На пользователя {member.mention} была отправлена жалоба.\n:bookmark_tabs: По причине: {arg}\n:bust_in_silhouette: Автор жалобы: {ctx.author.mention}**', color=0x0c0c0c))

Add to your tasks)

W
wetwixs, 2020-08-14
@wetwixs

Only robot hamsters are written in js. But it will not be difficult to write this code in python.

@client.command() #
async def report(stx):
    thhchannel = stx.message.channel 
    ttttt = client.get_channel(703596631261577262) # канал, где данная команда будет работать.
    if thhchannel == ttttt: #Если сообщение написано в данном канале, выполняется код.
        await stx.channel.purge(limit = 1)
        author = stx.message.author
        guild = stx.message.guild
        creport = discord.utils.get(stx.guild.categories, name = 'report') #название категории, где будет создаваться тема.
        await guild.create_text_channel(f'ticket {author.name}', overwrites = None, category = creport, reason = 'Создание нового тикета.')
        server = client.get_guild(703596629814673428) # ID сервера.
        for channel in server.channels:
            if channel.name == f'ticket {author.name}':
                break
        await channel.set_permissions(author, read_messages = True, send_messages = True) #установка прав создателю репорта.
        spekmoder = discord.utils.get(stx.guild.roles, id = 738136827956953279) # Человек из модерации.
        await channel.set_permissions(spekmoder, read_messages = True, send_messages = True)
        alluser = discord.utils.get(stx.guild.roles, id = 703596629814673428) # everyone. 
        await channel.set_permissions(alluser, read_messages = False, send_messages = False)
    else: # Если команда !report не в том канале, ничего не происходит.
        channel = ctx.message.channel(703596631261577262)
        await stx.send('1')

The command to close the report is also not difficult. You just need to set other rights for the mentioned person and send some message about closing the report in PM or in the ticket itself, I think there will be no problems.
Hello from Arizona :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question