-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get all tags from author #26
Comments
Hi, I'm interested in joining this project for this seems to be useful when using discord and I'm a fan of it I want to start from this issue but have hard time where to start reading the source code from Would you mind giving me some hints on it? Also, where can i find the test codes and the code conventions? |
Hello @kaestro, thanks for reaching me on this issue. You can find mostly all the information you need within the contributing guide and Readme. Here, the main task is to implement a You'll need to implement a new database query into Please don't hesitate to reach me here if you need further explains about the issue, bot setup or this project |
Do get all tags from author mean that this needs to specify which author has written the tag? if it's so, I wonder how I can test to create tags from other user. Or does it mean to get all tags from the user who used the command itself? |
Another question I tried creating the command, and the problem is the if I type in author as my discord account 'kaestro' no message comes out. My guess is that when saving tags, created by isn't saved as raw string, or does it? Is there any way that I should be formatting before using sqlite? |
Hey @kaestro, authors are stored by user_id to handle names changes. As you can notice here https://github.com/tarto-dev/tagsy-discord/blob/master/modals%2Fadd_tag.py#L61 The trick is to search for users in the current server with that ID and recover the username with it. |
This should do the work async def get_username(guild_id, user_id):
guild = client.get_guild(guild_id)
if guild:
member = await guild.fetch_member(user_id)
if member:
return member.name
return "User not found" (they're might be some mistake as I'm typing with my phone ^^') |
I couldn't find where get_guild or client are at. Is it supposed to be inside context_menu? Only place I could spot guild_id was inside context_menu.py and couldn't find where client is initialized. Also, can you guide me on opening up db of tagsy-discord project? I think this kind of problem is happening for I don't know the structure of db itself, use of disnake, etc. Thank you for your support even when you couldn't access the pc :) |
Hey! Sorry for the late reply, I was in vacation. Those two methods are herited by the discord SDK (Disnake) and are accessible from Client or Context variables. You should be able to get the information from the documentation. I can give you a database dump, but you can access it just by running the app and adding a tag. You then should be able to mount/read it with vscode and it's sqlite plug-in. If you want, I can share my discord username to avoid github delay and give you further explanation 😉 Just let me know if you need anything else |
How was your vacation? Did you go to abroad? It's really glad to hear that you've gone for a vacation had maybe had a good time there :) I agree with the idea that sharing discord username will help a lot. Send me yours through my email address (xxxxxxxxxxxxxxxx) or maybe opening up a channel can help. EDIT Tarto : Since issues are public, I edited your post to remove your mail address. |
No description provided.
The text was updated successfully, but these errors were encountered: