commit
dad789f6f5
@ -41,7 +41,7 @@ ________________________________________________________________________________
|
||||
- If you mess up the setup of `credentials.json`, rename `credentials_example.json` to `credentials.json`.
|
||||
- Open the file with [Notepad++][Notepad++].
|
||||
- In there you will see fields such as `Token`, `ClientId`, `BotId` and `OwnerIDs`.
|
||||
- In your [applications page][DiscordApp] (the window you were asked to keep open earlier), under the `Bot User` section, you will see `Token:click to reveal`, click to reveal the token.
|
||||
- In your [applications page][DiscordApp] (the window you were asked to keep open earlier), under the `Bot User` section, you will see `Token:click to reveal`, click to reveal the token. (Note: Make sure that you actually use a Token and not a Client Secret! It is in the **App Bot User** tab.)
|
||||
- Copy your bot's token, and on the `"Token"` line of your `credentials.json`, paste your bot token between the quotation marks.
|
||||
- Copy the `Client ID` on the page and replace the `12312123` part of the `ClientId` line with it.
|
||||
- Again, copy the same `Client ID` and replace the `null` part of the `BotId` line with it.
|
||||
|
1555
src/NadekoBot/Migrations/20170501103455_patreon-id.Designer.cs
generated
Normal file
1555
src/NadekoBot/Migrations/20170501103455_patreon-id.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
24
src/NadekoBot/Migrations/20170501103455_patreon-id.cs
Normal file
24
src/NadekoBot/Migrations/20170501103455_patreon-id.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace NadekoBot.Migrations
|
||||
{
|
||||
public partial class patreonid : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "PatreonUserId",
|
||||
table: "RewardedUsers",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PatreonUserId",
|
||||
table: "RewardedUsers");
|
||||
}
|
||||
}
|
||||
}
|
@ -966,6 +966,8 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Property<DateTime>("LastReward");
|
||||
|
||||
b.Property<string>("PatreonUserId");
|
||||
|
||||
b.Property<ulong>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
@ -52,8 +52,8 @@ namespace NadekoBot.Modules.Games.Trivia
|
||||
return new TriviaQuestion("Who's That Pokémon?",
|
||||
map[num].ToTitleCase(),
|
||||
"Pokemon",
|
||||
$@"http://nadekobot.xyz/images/pokemon/shadows/{num}.png",
|
||||
$@"http://nadekobot.xyz/images/pokemon/real/{num}.png");
|
||||
$@"http://nadekobot.me/images/pokemon/shadows/{num}.png",
|
||||
$@"http://nadekobot.me/images/pokemon/real/{num}.png");
|
||||
}
|
||||
TriviaQuestion randomQuestion;
|
||||
while (exclude.Contains(randomQuestion = pool[rng.Next(0, pool.Length)])) ;
|
||||
|
@ -173,13 +173,14 @@ namespace NadekoBot.Modules.Utility
|
||||
using (var uow = DbHandler.UnitOfWork())
|
||||
{
|
||||
var users = uow._context.Set<RewardedUser>();
|
||||
var usr = users.FirstOrDefault(x => x.UserId == userId);
|
||||
var usr = users.FirstOrDefault(x => x.PatreonUserId == data.User.id);
|
||||
|
||||
if (usr == null)
|
||||
{
|
||||
users.Add(new RewardedUser()
|
||||
{
|
||||
UserId = userId,
|
||||
PatreonUserId = data.User.id,
|
||||
LastReward = now,
|
||||
AmountRewardedThisMonth = amount,
|
||||
});
|
||||
@ -194,6 +195,7 @@ namespace NadekoBot.Modules.Utility
|
||||
{
|
||||
usr.LastReward = now;
|
||||
usr.AmountRewardedThisMonth = amount;
|
||||
usr.PatreonUserId = data.User.id;
|
||||
|
||||
await CurrencyHandler.AddCurrencyAsync(userId, "Patreon reward - recurring", amount, uow).ConfigureAwait(false);
|
||||
|
||||
@ -207,6 +209,7 @@ namespace NadekoBot.Modules.Utility
|
||||
|
||||
usr.LastReward = now;
|
||||
usr.AmountRewardedThisMonth = amount;
|
||||
usr.PatreonUserId = data.User.id;
|
||||
|
||||
await CurrencyHandler.AddCurrencyAsync(usr.UserId, "Patreon reward - update", toAward, uow).ConfigureAwait(false);
|
||||
|
||||
|
@ -184,7 +184,7 @@
|
||||
<value>greetmsg</value>
|
||||
</data>
|
||||
<data name="greetmsg_desc" xml:space="preserve">
|
||||
<value>Sets a new join announcement message which will be shown in the server's channel. Type `%user%` if you want to mention the new member. Using it with no message will show the current greet message. You can use embed json from <http://nadekobot.xyz/embedbuilder/> instead of a regular text, if you want the message to be embedded.</value>
|
||||
<value>Sets a new join announcement message which will be shown in the server's channel. Type `%user%` if you want to mention the new member. Using it with no message will show the current greet message. You can use embed json from <http://nadekobot.me/embedbuilder/> instead of a regular text, if you want the message to be embedded.</value>
|
||||
</data>
|
||||
<data name="greetmsg_usage" xml:space="preserve">
|
||||
<value>`{0}greetmsg Welcome, %user%.`</value>
|
||||
@ -202,7 +202,7 @@
|
||||
<value>byemsg</value>
|
||||
</data>
|
||||
<data name="byemsg_desc" xml:space="preserve">
|
||||
<value>Sets a new leave announcement message. Type `%user%` if you want to show the name the user who left. Type `%id%` to show id. Using this command with no message will show the current bye message. You can use embed json from <http://nadekobot.xyz/embedbuilder/> instead of a regular text, if you want the message to be embedded.</value>
|
||||
<value>Sets a new leave announcement message. Type `%user%` if you want to show the name the user who left. Type `%id%` to show id. Using this command with no message will show the current bye message. You can use embed json from <http://nadekobot.me/embedbuilder/> instead of a regular text, if you want the message to be embedded.</value>
|
||||
</data>
|
||||
<data name="byemsg_usage" xml:space="preserve">
|
||||
<value>`{0}byemsg %user% has left.`</value>
|
||||
@ -2329,7 +2329,7 @@
|
||||
<value>`{0}greetdmmsg Welcome to the server, %user%`.</value>
|
||||
</data>
|
||||
<data name="greetdmmsg_desc" xml:space="preserve">
|
||||
<value>Sets a new join announcement message which will be sent to the user who joined. Type `%user%` if you want to mention the new member. Using it with no message will show the current DM greet message. You can use embed json from <http://nadekobot.xyz/embedbuilder/> instead of a regular text, if you want the message to be embedded.</value>
|
||||
<value>Sets a new join announcement message which will be sent to the user who joined. Type `%user%` if you want to mention the new member. Using it with no message will show the current DM greet message. You can use embed json from <http://nadekobot.me/embedbuilder/> instead of a regular text, if you want the message to be embedded.</value>
|
||||
</data>
|
||||
<data name="cash_desc" xml:space="preserve">
|
||||
<value>Check how much currency a person has. (Defaults to yourself)</value>
|
||||
|
@ -5,6 +5,7 @@ namespace NadekoBot.Services.Database.Models
|
||||
public class RewardedUser : DbEntity
|
||||
{
|
||||
public ulong UserId { get; set; }
|
||||
public string PatreonUserId { get; set; }
|
||||
public int AmountRewardedThisMonth { get; set; }
|
||||
public DateTime LastReward { get; set; }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user